package com.itheima.demo08;

public class MainClass {
    public static void main(String[] args) {
        int num = useCalculator((a, b) -> a + b);

        System.out.println(num);
    }

    public static int useCalculator(Calculator calculator){
        int result = calculator.cal(10, 20);
        return result;
    }
}

interface Calculator{
    int cal(int a,int b);
}
